<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>测试EL表达式</h1>
<hr>
<ul>
<li>普通字符串</li>
hello(jsp脚本)：<%=request.getAttribute("hello") %> <br>
hello(EL表达式：语法$和{}):${hello }<br>
hello(EL的内置对象：pageScope,requestScope,sessionScope,applicationScope)<br>
 如果不指定范围，它的搜索顺序为：pageScope---applicationScope<br>
      --------------举例----------------    <br>
${requestScope.hello }<br>
hellp(EL表达式：指定范围从session中取得)：值为“${sessionScope.hello } ”<br>
<P>
<li>结构:采用.进行导航，称为存取器</li><br>
           姓名：${user.name } <br> 
           年龄：${user.age }<br>
	所属组：${user.group.name }<br>
<p>
<li>map:采用进行导航，称为存取器</li><br>
map.key1:${map.key1 }  <br>
map.key2:${map.key2 }  <br>
<p>
<li>字符串数组:------>采用[]下标</li> <br>
strArray[0]:${str_array[0]} <br>
strArray[1]:${str_array[1]} <br>
strArray[2]:${str_array[2]} <br>
strArray[3]:${str_array[3]} <br>
strArray[4]:${str_array[4]} <br>  
<p>
<li>对象数组:------>采用[]下标</li>
users[0]:${users[0].name } <br>
users[1]:${users[1].name } <br>
users[2]:${users[2].name } <br>
users[3]:${users[3].name } <br>
users[4]:${users[4].name } <br>	      
<p>
<li>lisr:采用[]下表</li>
groupList[0].name:${groupList[0].name }<br>
groupList[1].name:${groupList[1].name }<br>
groupList[2].name:${groupList[2].name }<br>
groupList[3].name:${groupList[3].name }<br>
groupList[4].name:${groupList[4].name }<br>  
<p>
<li>EL表达式对运算符的支持</li>
143+2=${143+2 }<br>
<p>
<li>测试empty</li>
tgb6:${empty tgb6 }<br>
tgb7:${empty tgb7 }<br>
tgb8:${empty tgb8 }<br>
tgb9:${empty tgb9 }<br>
</ul>
</body>
</html>